<?php

/* 用户银行卡 */
class UserbankModel extends BaseModel
{
	var $table  = 'user_bank';
	var $prikey = 'bank_id';
	var $_name  = 'user_bank';

	/*
	* 判断名称是否唯一
	*/
	function unique($bank_account, $user_id,$bank_id = 0)
	{
		//echo "aa";die();

		$conditions = "bank_account = '" . $bank_account . "' AND user_id = ".$user_id;
		//dump($conditions);
		return count($this->find(array('conditions' => $conditions))) == 0;
	}
}



?>